export { };

/** 车的枚举 */
enum CarEnum {
  /** 奔驰 */
  Ben,
  /** 宝马 */
  Bao,
  /** 奥迪 */
  Ou
}


class Car {
  name: string;
  static Create(carType: CarEnum): Car {
    let car: Car;
    switch (carType) {
      case CarEnum.Ben:
        car = new Ben();
        break;
      case CarEnum.Bao:
        car = new Bao();
        break;
      case CarEnum.Ou:
        car = new Ou();
        break;
    };
    return car;
  }

}

class Ben extends Car { };
class Bao extends Car { };
class Ou extends Car { };

